package com.zrwl.poscloud.commons.feign;

import com.zrwl.poscloud.commons.config.feign.FeignConfiguration;
import com.zrwl.poscloud.commons.fallback.AdminFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 后台服务feign远程调用
 *
 * @author liusitong
 * @date 2020年1月21日22:19:10
 */

@FeignClient(name = "pos-admin", configuration = FeignConfiguration.class, fallback = AdminFeignFallback.class)
public interface AdminFeignClient {


    /**
     * 商户服务器处理来自中心转发的请求
     */
    @RequestMapping(value = "/proxy/request", method = RequestMethod.POST)
    String proxyRequest(@RequestParam("meJsonStr") String meJsonStr, @RequestParam("requestUrl") String requestUrl, @RequestParam("requestHeaderJsonStr") String requestHeaderJsonStr, @RequestParam("requestParamJsonStr") String requestParamJsonStr);

    /**
     * 获取系统配置信息
     */
    @RequestMapping(value = "/systemConfig/getSystemConfig", method = RequestMethod.GET)
    public String getSystemConfig();
}